package com.bwie.advertisement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bwie.advertisement.mapper.PmsAdvertisementMapper;
import com.bwie.advertisement.domain.PmsAdvertisement;
import com.bwie.advertisement.service.IPmsAdvertisementService;

/**
 * 广告Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-14
 */
@Service
public class PmsAdvertisementServiceImpl implements IPmsAdvertisementService 
{
    @Autowired
    private PmsAdvertisementMapper pmsAdvertisementMapper;

    /**
     * 查询广告
     * 
     * @param id 广告主键
     * @return 广告
     */
    @Override
    public PmsAdvertisement selectPmsAdvertisementById(Long id)
    {
        return pmsAdvertisementMapper.selectPmsAdvertisementById(id);
    }

    /**
     * 查询广告列表
     * 
     * @param pmsAdvertisement 广告
     * @return 广告
     */
    @Override
    public List<PmsAdvertisement> selectPmsAdvertisementList(PmsAdvertisement pmsAdvertisement)
    {
        return pmsAdvertisementMapper.selectPmsAdvertisementList(pmsAdvertisement);
    }

    /**
     * 新增广告
     * 
     * @param pmsAdvertisement 广告
     * @return 结果
     */
    @Override
    public int insertPmsAdvertisement(PmsAdvertisement pmsAdvertisement)
    {
        return pmsAdvertisementMapper.insertPmsAdvertisement(pmsAdvertisement);
    }

    /**
     * 修改广告
     * 
     * @param pmsAdvertisement 广告
     * @return 结果
     */
    @Override
    public int updatePmsAdvertisement(PmsAdvertisement pmsAdvertisement)
    {
        return pmsAdvertisementMapper.updatePmsAdvertisement(pmsAdvertisement);
    }

    /**
     * 批量删除广告
     * 
     * @param ids 需要删除的广告主键
     * @return 结果
     */
    @Override
    public int deletePmsAdvertisementByIds(Long[] ids)
    {
        return pmsAdvertisementMapper.deletePmsAdvertisementByIds(ids);
    }

    /**
     * 删除广告信息
     * 
     * @param id 广告主键
     * @return 结果
     */
    @Override
    public int deletePmsAdvertisementById(Long id)
    {
        return pmsAdvertisementMapper.deletePmsAdvertisementById(id);
    }
}
